Adaptive Memoization

نویسندگان

  • Umut A. Acar
  • Guy E. Blelloch
  • Robert Harper
چکیده

We combine adaptivity and memoization to obtain an incremental computation technique that dramatically improves performance over adaptivity and memoization alone. The key contribution is adaptive memoization, which enables result re-use by matching any subset of the function arguments to a previous function call and updating the result to satisfy the unmatched arguments via adaptivity. We study the technique in the context of a purely functional language, called IFL, and as an ML library. The library provides an efficient implementation of our techniques with constant overhead. As examples, we consider Quicksort and Insertion Sort. We show that Quicksort handles insertions or deletions at random positions in the input list in O(log n) expected time. For insertion sort, we show that insertions and deletions anywhere in the list take O(n) time.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Abstract Adaptive Memoization ∗

Memoization may be viewed as a mechanism for re-using a computation—if a function is re-applied to the same argument we may re-use the previous computation to determine the result, rather than perform it again. Conventional memoization is accurate in the sense that it only permits re-use when a computation will be precisely the same as one that has already been performed. But in many cases a co...

متن کامل

Multidimensional Predicates for Prolog

In 2014, Ungar et al. proposed Korz, a new computational model for structuring adaptive (objectoriented) systems [UOK14]. Korz combines implicit parameters and multiple dispatch to structure the behavior of objects in a multidimensional space. Korz is a simple yet expressive model which does not require special programming techniques such as the Visitor or Strategy pattern to accommodate a syst...

متن کامل

Using Automatic Memoization as a Software Engineering Tool in Real-World AI Systems

Memo functions and memoization are well-known concepts in A I programming. They have been discussed since the Sixties and are ofien used as ezamples in introductory programming texts. However, the automation of memoization as a practical sofiware engineering tool f o r A I systems has not received a detailed treatment. This paper describes how automatic memoization can be made viable on a large...

متن کامل

Monadic Memoization Mixins

Memoization is a familiar technique for improving the performance of programs: computed answers are saved so that they can be reused later instead of being recomputed. In a pure functional language, memoization of a function is complicated by the need to manage the table of saved answers between calls to the function, including recursive calls within the function itself. A lazy recursive data s...

متن کامل

Using Automatic Memoization as a Software Engineering Tool in Real-world Ai Systems

Memo functions and memoization are well known concepts in AI programming. They have been around since the sixties and are often used as examples in introductory programming texts. However, the automation of memoization as a practical software engineering tool for AI systems has never received a detailed treatment. This paper describes how automatic memoization can be made viable on a large scal...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2003